import request from '@/utils/request'

export default {
    pageClass(current, limit, name) {
        return request({
            url: `/course/front/class/pageClass/${current}/${limit}`,
            method: 'get',
            params: { name }
        })
    },

    getClassById(id) {
        return request({
            url: `/course/front/class/getFrontClassInfo/${id}`,
            method: 'get',
        })
    },

    isUserInClass(classId) {
        return request({
            url: `/course/front/class/isUserInClass/${classId}`,
            method: 'get',
        })
    },

    userInClass(classId) {
        return request({
            url: `/course/front/class/userInClass/${classId}`,
            method: 'put',
        })
    },

    userOutClass(classId) {
        return request({
            url: `/course/front/class/userOutClass/${classId}`,
            method: 'delete',
        })
    },

    getUserClass(current, limit) {
        return request({
            url: `/course/front/class/getUserClass/${current}/${limit}`,
            method: 'get',

        })
    },




}